/**
 * 
 */
package com.avocado.base.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;


@Embeddable
@JsonIgnoreProperties(value={"handler","hibernateLazyInitializer"})
@Data
public class ResourcesRoleId implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8198939785252711329L;
	@Column(name="ROLE_ID",nullable=false)
	private long roleId;
	@Column(name="RESOURCES_ID",nullable=false)
	private long resourcesId;
	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (resourcesId ^ (resourcesId >>> 32));
		result = prime * result + (int) (roleId ^ (roleId >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj){
			return true;
		}
		if (obj == null){
			return false;
		}
		if (getClass() != obj.getClass()){
			return false;
		}
		ResourcesRoleId other = (ResourcesRoleId) obj;
		if (resourcesId != other.resourcesId){
			return false;
		}
		if (roleId != other.roleId){
			return false;
		}
		return true;
	}
	
	

	
	
	
	

}
